<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>精选好物推荐</title>
		<script src="https://cdn.tailwindcss.com"></script>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
	</head>
	<body class="bg-gray-50">
		<!-- 顶部导航 -->
		<nav class="bg-white shadow-md sticky top-0 z-50">
			<div class="container mx-auto px-4">
				<div class="flex justify-between items-center h-16">
					<div class="flex items-center">
						<i class="fas fa-store text-2xl text-indigo-600 mr-2"></i>
						<span class="text-xl font-bold">精选好物</span>
					</div>
					<button id="shareBtn" class="bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 transition">
						<i class="fas fa-share-alt mr-2"></i>分享
					</button>
				</div>
			</div>
		</nav>

		<!-- 主要内容区 -->
		<main class="container mx-auto px-4 py-8">
			<!-- 轮播图 -->
			<div class="mb-8">
				<div class="relative rounded-lg overflow-hidden">
					<img src="https://picsum.photos/seed/banner1/1200/400" alt="Banner" class="w-full">
					<div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/50 to-transparent p-4">
						<h2 class="text-white text-2xl font-bold">今日特惠</h2>
						<p class="text-white">精选商品限时优惠</p>
					</div>
				</div>
			</div>

			<!-- 商品分类 -->
			<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
				<div class="bg-white rounded-lg p-4 text-center hover:shadow-lg transition cursor-pointer">
					<i class="fas fa-mobile-alt text-3xl text-blue-500 mb-2"></i>
					<p>数码家电</p>
				</div>
				<div class="bg-white rounded-lg p-4 text-center hover:shadow-lg transition cursor-pointer">
					<i class="fas fa-tshirt text-3xl text-pink-500 mb-2"></i>
					<p>服饰鞋包</p>
				</div>
				<div class="bg-white rounded-lg p-4 text-center hover:shadow-lg transition cursor-pointer">
					<i class="fas fa-utensils text-3xl text-green-500 mb-2"></i>
					<p>美食生鲜</p>
				</div>
				<div class="bg-white rounded-lg p-4 text-center hover:shadow-lg transition cursor-pointer">
					<i class="fas fa-home text-3xl text-yellow-500 mb-2"></i>
					<p>家居生活</p>
				</div>
			</div>

			<!-- 商品列表 -->
			<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
				<!-- 商品卡片1 -->
				<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition">
					<img src="https://picsum.photos/seed/product1/300/300" alt="商品" class="w-full h-48 object-cover">
					<div class="p-4">
						<h3 class="font-bold mb-2">智能手表 Pro</h3>
						<p class="text-gray-600 text-sm mb-2">健康监测，运动追踪，续航持久</p>
						<div class="flex justify-between items-center">
							<span class="text-red-500 font-bold text-xl">¥999</span>
							<button class="bg-indigo-500 text-white px-4 py-2 rounded hover:bg-indigo-600 transition">
								立即购买
							</button>
						</div>
					</div>
				</div>

				<!-- 商品卡片2 -->
				<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition">
					<img src="https://picsum.photos/seed/product2/300/300" alt="商品" class="w-full h-48 object-cover">
					<div class="p-4">
						<h3 class="font-bold mb-2">无线耳机 Max</h3>
						<p class="text-gray-600 text-sm mb-2">主动降噪，高音质，舒适佩戴</p>
						<div class="flex justify-between items-center">
							<span class="text-red-500 font-bold text-xl">¥1299</span>
							<button class="bg-indigo-500 text-white px-4 py-2 rounded hover:bg-indigo-600 transition">
								立即购买
							</button>
						</div>
					</div>
				</div>

				<!-- 商品卡片3 -->
				<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition">
					<img src="https://picsum.photos/seed/product3/300/300" alt="商品" class="w-full h-48 object-cover">
					<div class="p-4">
						<h3 class="font-bold mb-2">智能音箱 Mini</h3>
						<p class="text-gray-600 text-sm mb-2">AI语音助手，智能家居控制</p>
						<div class="flex justify-between items-center">
							<span class="text-red-500 font-bold text-xl">¥299</span>
							<button class="bg-indigo-500 text-white px-4 py-2 rounded hover:bg-indigo-600 transition">
								立即购买
							</button>
						</div>
					</div>
				</div>
			</div>
		</main>

		<!-- 底部 -->
		<footer class="bg-gray-800 text-white mt-12 py-8">
			<div class="container mx-auto px-4 text-center">
				<p> &copy; 2025-11-11 高州市三生编程工作室 @Mr.Three:2848850188</p>
			</div>
		</footer>

		<!-- 分享提示 -->
		<div id="shareTip" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
			<div class="bg-white rounded-lg p-6 max-w-sm mx-4">
				<h3 class="text-lg font-bold mb-4">分享到微信</h3>
				<p class="text-gray-600 mb-4">点击右上角按钮，选择"分享给朋友"或"分享到朋友圈"</p>
				<button id="closeTip" class="bg-indigo-500 text-white px-4 py-2 rounded hover:bg-indigo-600 transition w-full">
					我知道了
				</button>
			</div>
		</div>

		<script>
			// 配置微信分享
			wx.config({
				debug: false,
				appId: 'YOUR_APPID', // 这里需要填写你的微信AppID
				timestamp: 1234567890, // 这里需要填写生成签名的时间戳
				nonceStr: 'random-string', // 这里需要填写生成签名的随机字符串
				signature: 'YOUR_SIGNATURE', // 这里需要填写签名
				jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
			});

			wx.ready(function() {
				// 分享给朋友
				wx.updateAppMessageShareData({
					title: '精选好物推荐', // 分享标题
					desc: '发现更多优质商品，享受特惠价格', // 分享描述
					link: window.location.href, // 分享链接
					imgUrl: 'https://picsum.photos/seed/share/300/300', // 分享图标
					success: function() {
						// 设置成功
					}
				});

				// 分享到朋友圈
				wx.updateTimelineShareData({
					title: '精选好物推荐 - 发现更多优质商品', // 分享标题
					link: window.location.href, // 分享链接
					imgUrl: 'https://picsum.photos/seed/share/300/300', // 分享图标
					success: function() {
						// 设置成功
					}
				});
			});

			// 分享按钮点击事件
			document.getElementById('shareBtn').addEventListener('click', function() {
				document.getElementById('shareTip').style.display = 'flex';
			});

			// 关闭分享提示
			document.getElementById('closeTip').addEventListener('click', function() {
				document.getElementById('shareTip').style.display = 'none';
			});
		</script>
	</body>
</html>